Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix concurrent map access and remove unwanted code #245

Merged
merged 3 commits into from
Jul 14, 2022

Conversation

aattuluri
Copy link
Contributor

@aattuluri aattuluri commented Jul 14, 2022

Fix concurrent map access on multiple controllers.
Remove unwanted code to create SEs based on user created destination rules.
Add -race to detect races in tests.

Fix concurrent map access. Remove unwanted code to create SEs based on user created destination rules
@@ -48,7 +48,7 @@ func TestDeleteCacheControllerThatDoesntExist(t *testing.T) {

w := RemoteRegistry{
RemoteControllers: make(map[string]*RemoteController),
StartTime: time.Now(),
StartTime: time.Now(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, formatting issues.

@@ -62,7 +62,7 @@ func TestDeleteCacheController(t *testing.T) {

w := RemoteRegistry{
RemoteControllers: make(map[string]*RemoteController),
StartTime: time.Now(),
StartTime: time.Now(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, formatting issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be the right formatting now. Was messed up before.

@codecov-commenter
Copy link

Codecov Report

Merging #245 (4b8551f) into master (5541b68) will increase coverage by 1.34%.
The diff coverage is 60.34%.

@@            Coverage Diff             @@
##           master     #245      +/-   ##
==========================================
+ Coverage   72.78%   74.13%   +1.34%     
==========================================
  Files          27       27              
  Lines        2657     2579      -78     
==========================================
- Hits         1934     1912      -22     
+ Misses        601      546      -55     
+ Partials      122      121       -1     
Impacted Files Coverage Δ
admiral/pkg/clusters/handler.go 63.63% <ø> (+7.48%) ⬆️
admiral/pkg/controller/admiral/deployment.go 83.15% <57.89%> (-3.94%) ⬇️
admiral/pkg/clusters/serviceentry.go 81.57% <58.82%> (+0.10%) ⬆️
admiral/pkg/controller/admiral/rollouts.go 75.47% <60.00%> (-6.53%) ⬇️
admiral/pkg/controller/admiral/dependency.go 92.00% <100.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5541b68...4b8551f. Read the comment docs.

@aattuluri aattuluri merged commit fbe8af7 into master Jul 14, 2022
@aattuluri aattuluri deleted the Prevent-concurrent-map-access branch July 14, 2022 23:50
itsLucario pushed a commit to itsLucario/admiral that referenced this pull request Aug 9, 2022
…cosystem#245) (istio-ecosystem#145)

* Fix concurrent map access and remove unwanted code (istio-ecosystem#245)

* MESH-1988

Co-authored-by: aattuluri <44482891+aattuluri@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants